<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <v-child :msg="msg"></v-child>
</div>
</body>
<script src="./js/vue.js"></script>
<script>

    Vue.config.productionTip = false;
    var vm = new Vue({
        el:"#app",
        data:{
            msg:101
        },
        components:{
            "v-child":{
                props:{
                    msg:{
                      type:Number,
                      validator: function (value) {
                          return value > 100
                      }
                      /*default:function () {
                          return {a:"a"}
                      }*/
                      // required:true
                    }
                },
                data(){
                    return  {}
                },
                template:"<span>{{msg}}</span>"
            }
        }
    })
</script>
</html>